package com.dd.cloud.common.annotate.validation;


import com.dd.cloud.common.annotate.validation.impl.WareValidation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 验证入库数量、
 */
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = WareValidation.class)
public @interface Ware {

    /**
     * 提示的开头 即替换message {begin}的内容
     * @return
     */
    String begin() default "";

    boolean required() default true;

    String message() default "{begin}数量格式不正确";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
